package com.itheima.reggie.mapper;

import com.itheima.reggie.entity.OrderDetail;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author: qingtao
 * @Date 2022/3/23 18:06
 */
public interface OrderDetailMapper {

    /**
     * 批量添加
     * @param orderDetailList
     */
    void saveBatch(@Param("orderDetailList") List<OrderDetail> orderDetailList);

    @Select("select * from order_detail where order_id=#{orderId}")
    List<OrderDetail> findByOrderId(Long orderId);
}
